package com.ruoyi.syf.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.syf.service.TreeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 树
 */
@RestController
@RequestMapping("/syf/tree")
public class TreeController extends BaseController {

    @Autowired
    private TreeService treeService;

    /**
     * 获取单元树
     */
    @GetMapping(value = "/unitTree")
    public AjaxResult unitTree() {
        return success(treeService.unitTree());
    }

    /**
     * 获取风险树
     */
    @GetMapping(value = "/evaluationTree")
    public AjaxResult evaluationTree() {
        return success(treeService.evaluationTree());
    }

}
